<include file="public:header" />
<link rel="stylesheet" type="text/css" href="__STATIC__/js/jquery-ui/themes/blue/jquery.ui.all.css" />
<link rel="stylesheet" type="text/css" href="__STATIC__/js/jquery-ui/extend/datepicker/jquery-ui-timepicker-addon.css" />

<div id="bd">
	<div class="layout grid-s45m0 w1000 user-center">
		<div class="col-main">
			<div class="main-wrap">
				<div class="box J_TBox">
					<div class="global-title">资金流水明细</div>
				</div>
				<div class="box J_TBox">
					<div class="global-title" style="border:none;">
						<div class="order_search_box">
							<form method="get" action="">
								<input type="text" style="width:100px" name="username" class="order_text fl" placeholder="用户名称" value="{$Think.get.username}">
								<input type="text" style="width:120px" name="tele" class="order_text fl" placeholder="请输入手机号码" value="{$Think.get.tele}">
								<!--<span class="standard_select fl">-->
									<!--<span class="select_shelter">-->
										<!--<select name="tgroup" class="order_select " style="width:130px;">-->
											<!--<option value="">用户类型(全部)</option>-->
											<!--<volist name="tgroup" id="val">-->
												<!--<if condition="$key egt 0">-->
													<!--<option value="{$key}"-->
													<!--<if condition="$search[tgroup] eq $key">selected</if>-->
													<!--&gt;{$val}</option>-->
												<!--</if>-->
											<!--</volist>-->
                                		<!--</select>-->
									<!--</span>-->
								<!--</span>-->

								<!--<span class="fl" style="font-size:12px;">团队名称：</span>-->
								<!--<input type="text" name="stime" class="J_date_picker order_text fl short" value="{$search[stime]}" style="width:100px">-->
								<!--团队名称-->
								<!--<span class="standard_select fl">-->
								<!--<span class="select_shelter">-->
                                <!--<select name="topkey" class="order_select " style="width:130px;">-->
                                    <!--<option value="">团队名称(全部)</option>-->
                                    <!--<volist name="topkey" id="val">-->
                                        <!--<if condition="$key egt 0">-->
                                            <!--<option value="{$val}"-->
                                            <!--<if condition="$search.topkey eq $val">selected</if>-->
                                            <!--&gt;{$val}</option>-->
                                        <!--</if>-->
                                    <!--</volist>-->
                                <!--</select>-->
								<!--</span>-->
								<!--</span>-->
								<!--<input type="hidden" name="id" value="{$search.id}">-->
								<!--<input type="hidden" name="profit" value="{$_GET['profit']}">-->
								<input type="hidden" name="g" value="team">
								<input type="hidden" name="m" value="user">
								<input type="hidden" name="a" value="price_list">

								<span class="fl" style="font-size:14px;">&nbsp;业务类型 :
								<select name="action" class="order_select " style="width:112px;height: 31px">
									<option value="-1">全部</option>
									<option value="order" <if condition="$action_ eq 'order'">selected</if>>消费</option>
									<option value="cash" <if condition="$action_ eq '现金'">selected</if>>现金</option>
									<option value="recharge" <if condition="$action_ eq 'recharge'">selected</if>>充值</option>
									<option value="order_refund"<if condition="$action_ eq 'order_refund'">selected</if>>退款</option>
									<option value="commission" <if condition="$action_ eq 'commission'">selected</if>>返佣</option>
									<option value="express" <if condition="$action_ eq 'express'">selected</if>>运费</option>
								</select>
								</span>
								<span>&nbsp;</span>
								<span class="fl" style="font-size:14px;"> 时间：</span><input type="text" name="stime" class="J_date_picker order_text fl short" value="{$search[stime]}" style="width:100px"> <span class="fl">~</span> <input type="text" name="etime" class="J_date_picker order_text fl short" value="{$search[etime]}" style="width:100px">
								<!--三级联动-->

								<span class="standard_select fl">
									<span class="select_shelter">
									<select id="" name="uid" onchange="getNestUids(this)" class="order_select fl" style="width:112px;">
										<option value="{$uid}">当前：{$new_username}</option>
                                        <foreach name="listTeams" item="vo" key="ko">
                                            <option value="{$vo.id}">{$vo.username}</option>
                                        </foreach>
									</select>
									</span>
								</span>
								<br/>
								<input type="submit" name="search" class="order_sub" value="搜索"/>
								<input type="submit" name="export" class="order_sub" value="导出到Excel文件" id="export-btn"/>
								<!--<input type="submit" name="search" class="btn" value="搜索" />-->
								<!--<input type="submit" name="export" class="btn mr10" value="导出到Excel文件">-->
							</form>
						</div>
					</div>
				</div>

				<div class="box J_TBox">
					<div class="diary-content">
						<table class="table_list" width="100%" cellspacing="0" cellpadding="0">
							<tr class="title">
								<th width="80">用户名称</th>
								<th width="80">手机号码</th>
								<th width="80">用户类型</th>
								<th width="60">业务类型</th>
								<th width="80">变动时间</th>
								<th width="60">变动金额</th>
								<th width="60">经纪人</th>
								<th width="80">代理商</th>
								<th width="80">经销商</th>
								<th width="90">总经销商</th>
								<th width="70">团队名称</th>
								<th width="70">备注</th>
							</tr>
							<tr class="content_tr underline">
                                <td colspan="14">
                                    <div class="weixiao">
                                        {$tuanNmae}是--{$new_username}--的资金明细是
                                    </div>
                                </td>
                            </tr>
							<if condition="$list">
								<volist name="list" id="val">
									<tr class="content_tr underline">
										<td align="center">{$val.uname}</td>
										<td>{$val.tele}</td>
										<td>{$val.uid|get_tgroup_id|get_tgroup}</td>

										<td>{$val.action|get_action}</td>
										<!--<td align="center">-->
											<!--<if condition="$val[action] gt order">-->
												<!--<font color="#33cc00">{$val.action|get_action}</font>-->
												<!--<else/><font color="#ff0000">{$val.action|get_action}</font></if></td>-->

										<td>{$val.add_time}</td>
										<td align="center">
											<if condition="$val[price] gt 0">
												<font color="#33cc00">{$val.price}</font>
												<else/><font color="#ff0000">{$val.price}</font></if></td>
										<td>{$val.tgroup_4_name}</td>
										<td>{$val.tgroup_3_name}</td>
										<td>{$val.tgroup_2_name}</td>
										<td>{$val.tgroup_1_name}</td>
										<td>{$val.topkey}</td>
										<td  align="center">{$val.remark}</td>
									</tr>
								</volist>
								<else />
								<tr class="content_tr underline">
									<td colspan="8"><div class="weixiao">暂无内容 </div></td>
								</tr>
							</if>
						</table>
					</div>
				</div>

				<div class="box J_TBox">
					<div class="global-pages">
						<span class="num">
							{$page}
						</span>
					</div>
				</div>

			</div>
		</div>
		<include file="user:left" />
	</div>
</div>

<script>
    //    清空
    function resets(f1)
    {
        $('#username').val('');
        $('#realname').val('');
        $('#stime').val('');
        $('#etime').val('');
        $('#topkey').find('option:first-child').attr('selected',"selected");
        $('#lottery').find('option:first-child').attr('selected',"selected");
    }

    //    级联
    function getNestUids(obj){
        var ob = $(obj);
        var uid = ob.val();
        var par = ob.parents('.standard_select');
        par.nextAll('.standard_select').remove();
        $.ajax({
            type:'get',
            url:"{:U('user/getNestUids')}",
            data:{uid:uid},
            success:function(data)
            {
                par.after(data);
            },
            error:function()
            {
//                console.log(data);
                alert('异常');
            },
            dataType:'json',
        });
    }
</script>
<!--主部结束-->

<include file="public:footer" />